﻿using System;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Input;
using System.Windows.Shapes;
using System.Windows.Controls;
using System.Collections.Generic;


namespace ERModelData
{
    class LinkMarkers : Markers
    {
        List<Link> TopLeftArrayLink;
        List<Link> TopArrayLink;
        List<Link> TopRightArrayLink;
        List<Link> RightArrayLink;
        List<Link> BottomRightArrayLink;
        List<Link> BottomArrayLink;
        List<Link> BottomLeftArrayLink;
        List<Link> LeftArrayLink;

        public LinkMarkers(Essence essence)
        {
            HidenMarkers();

            this.essence = essence;
            this.canvas = (Canvas)essence.Parent;

            TopLeft = CreateMarker();
            Top = CreateMarker();
            TopRight = CreateMarker();
            Right = CreateMarker();
            BottomRight = CreateMarker();
            Bottom = CreateMarker();
            BottomLeft = CreateMarker();
            Left = CreateMarker();
            
            TopLeftArrayLink = new List<Link>();
            TopArrayLink = new List<Link>();
            TopRightArrayLink = new List<Link>();
            RightArrayLink = new List<Link>();
            BottomRightArrayLink = new List<Link>();
            BottomArrayLink = new List<Link>();
            BottomLeftArrayLink = new List<Link>();
            LeftArrayLink = new List<Link>();
        }

        /// <summary>[static] Создание маркера</summary>
        /// <returns>Созданный маркер</returns>
        private static Rectangle CreateMarker()
        {
            Rectangle Marker = new Rectangle();
            Marker.Width = 6;
            Marker.Height = 6;
            Marker.StrokeThickness = 3;
            Marker.Fill = Brushes.LightBlue;
            Marker.Stroke = Brushes.DarkBlue;
            return Marker;
        }

    }
}
